import os, sys, unittest

sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))))

from autotest import *

if __name__ == '__main__':
    setattr(VAR, "sql", sql)

    tests = get_tests()

    suite = unittest.TestSuite(tests)

    from autotest.core.runner import TextTestRunner

    runner = TextTestRunner(descriptions='task_{}'.format(VAR.project_start_time))
    result = runner.run(suite)

    from autotest.core.report import generate_task_report

    result.log = logger
    generate_task_report(result)
